home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0919.dms / q0919.adf / man / Eval < prev    next >
Text File  |  1997-04-10  |  3KB  |  83 lines

  1.  
  2.  
  3.  
  4.                    Eval(V1.3, 2.x, and 3.x in C:)
  5.  
  6.  
  7.  
  8.      NAME
  9.             Eval - evaluate arithmetic and logical expressions.
  10.  
  11.      SYNOPSIS
  12.             Eval Value1/a Op Value2 TO/k L=LFORMAT/k
  13.  
  14.      DESCRIPTION
  15.             Eval computes the results of simple arithmetic and 
  16.         logical expressions as applied to two arguments, and 
  17.         displays the result on its standard output. Numeric 
  18.         arguments may be input as:
  19.  
  20.           Decimal
  21.             This is the default, no extra qualifiers needed.
  22.  
  23.           Hexadecimal
  24.             Enter hexadecimal numbers as 0x<number> or 
  25.         #x<number>, for example:  0x1A or #x1A.
  26.  
  27.           Octal
  28.             Enter octal numbers as 0<number> or #<number>, for 
  29.         example: 0777 or #777.
  30.  
  31.           Binary
  32.             Binary numbers (in ARP eval only) may be entered with 
  33.         #B, for example:  B1111
  34.  
  35.           Character
  36.             Characters are supported only by the Commodore Eval.
  37.  
  38.           The operations supported are given below:
  39.  
  40.           addition        +         not                    ~
  41.           subtraction     -         left shift            <<
  42.           multiplication  *         right shift           >>
  43.           division        /         negation               -
  44.           mod            mod        exclusive or          xor
  45.           and             &         bitwise equivalence   eqv
  46.           or              |
  47.  
  48.             Any fractional amounts that result from this process 
  49.         are discarded.
  50.  
  51.      OPTIONS
  52.           TO  
  53.             You can send the output of Eval to a file which is 
  54.         indicated in the path with this keyword.
  55.  
  56.           L=LFORMAT
  57.             You can control the output format of Eval using this 
  58.         keyword. 
  59.  
  60.             There are four formats you specify: hexadecimal (%X) 
  61.         Octal (%O), Decimal (%N), or ASCII (%C). The hex and 
  62.         octal formats require a number after the letter to 
  63.         indicate how many letters you want to print.    For 
  64.         example, to display a hexadecimal number in a field of 8, 
  65.         you can do LFORMAT="%08lx".  You can also include escape 
  66.         characters (such as *n for a newline) inside your LFORMAT 
  67.         string.  For this release of Eval, you also need to 
  68.         always use the 'l' (for long) format character with all 
  69.         format commands.  The default is set to Decimal. 
  70.             
  71.             You can also include any text you desire in the 
  72.         format string by using quotes. For example:
  73.  
  74.                 LFORMAT = "There are %N widgets sold."
  75.      EXAMPLE
  76.          
  77.             1. To find the sum of 2 + 2 and print the answer as 2 
  78.         octal digits followed by a new line character.
  79.  
  80.             EVAL 2 + 2 LFORMAT = "%O2*N"
  81.  
  82.  
  83.